package cn.vcjf.weapp.api.user.entity;

import cn.vcjf.weapp.common.web.PageModel;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * <p>
    * 
    * </p>
 *
 * @author zhengzihang
 * @since 2018-09-25
 */
@TableName("vc_user_address")
public class UserAddress extends PageModel<UserAddress> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @NotNull
    private Integer userId;

    /**
     * 是否默认收货地址
     */
    private Integer def;

    private Integer provinceId;

    private Integer cityId;

    private Integer countryId;

    /**
     * 详细地址
     */
    @NotBlank
    private String address;

    /**
     * 收货人姓名
     */
    @NotBlank
    private String userName;

    /**
     * 用户性别(0未知,1男,2女)
     */
    private Integer sex;

    /**
     * 收货人手机号码
     */
    @NotBlank
    private String phoneNo;
    /**
     * 邮政编码
     */
    private String postCode;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    public Integer getDef() {
        return def;
    }

    public void setDef(Integer def) {
        this.def = def;
    }
    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }
    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }
    public Integer getCountryId() {
        return countryId;
    }

    public void setCountryId(Integer countryId) {
        this.countryId = countryId;
    }
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    @Override
    public void preInsert(){
        super.preInsert();
    }
    @Override
    public void preUpdate(){
        super.preInsert();
    }
    @Override
    public String toString() {
        return "UserAddress{" +
        "id=" + id +
        ", userId=" + userId +
        ", def=" + def +
        ", provinceId=" + provinceId +
        ", cityId=" + cityId +
        ", countryId=" + countryId +
        ", address=" + address +
        ", userName=" + userName +
        ", sex=" + sex +
        ", phoneNo=" + phoneNo +
        ", createUser=" + createUser +
        ", createTime=" + createTime +
        ", updateUser=" + updateUser +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        ", sysUserId=" + sysUserId +
        "}";
    }
}
